CUSTOM Windows API .NET 1.08
Loading...
Searching...
No Matches
Custom.CuCustomWndAPI.CuCustomWndAPIWrap Class Reference

Public Types

enum  CcwLogVerbosity : byte
 Verbosity level. More...
 
enum  OpenDeviceMode : byte
 Open Communication Port Mode. More...
 

Public Member Functions

 CuCustomWndAPIWrap ()
 Costructor. Use the default log verbosity level and Log folder path.

 
 CuCustomWndAPIWrap (CcwLogVerbosity logVerbosity, String strLogFolderPath)
 Costructor. Also specify log verbosity level and other settings.
 
void InitLibrary ()
 Initializes library. This must be the first call after the creation of the class.
 
void DeInitLibrary ()
 De-initialize library. Call this function as the last function before deinit the class.
 
String GetAPIVersion ()
 Returns current API version.
 
String GetAPIVersionHwLibrary ()
 Gets the API release for hardware library (C-library)
 
object GetVariable (CuCustomWndDevice device, String var)
 Get the value of an internal "parameter".
 
void SetVariable (object device, String var, object value)
 Set the value of an internal "parameter".
 
void SetOpenDeviceMode (OpenDeviceMode ode)
 Set the open mode for the devices.
 
OpenDeviceMode GetOpenDeviceMode ()
 Get the open mode for the devices.
 
void BinFileToPrintSpooler (String strPrinterName, String strFilePath, String strDocName)
 Send a binary file into the printer spooler queue.
 
PrinterInfo[] EnumInstalledPrinters ()
 Enum the supported printers installed.
 
CuCustomWndDevice OpenInstalledPrinter (String strPrinterName)
 Open the communication with a Installed printer.
 
USBDevice[] EnumUSBDevices ()
 Enum the usb devices connected.
 
CuCustomWndDevice OpenPrinterUSB (USBDevice udevice)
 Open the communication with a USB printer.
 
ETHDevice[] EnumETHDevices (UInt32 dwSearchTimeout)
 Enum the Ethernet/Wifi devices connected.
 
CuCustomWndDevice OpenPrinterETH (String strPrinterIPAddress, UInt32 dwPrinterIPPort=9100)
 Open the communication with a Ethernet / WIFI printer.
 
CuCustomWndDevice OpenPrinterETH (ETHDevice ethdevice)
 
COMPort[] EnumCOMPorts ()
 Enum the COM Ports found.
 
CuCustomWndDevice OpenPrinterCOM (COMPort cport)
 
CuCustomWndDevice OpenPrinterCOM (String strcport)
 Open the communication with a COM port to printer.
 
PrinterStatus GetInstalledPrinterFullStatus (String strPrinterName)
 Open the communication port, Get the status of a installed printer and close the communication with the device.
 

Detailed Description

Main class of the library to init/deinit and open a device

Member Enumeration Documentation

◆ CcwLogVerbosity

Verbosity level.

Enumerator
CCW_LOG_DISABLED 

Log completely disabled

CCW_LOG_FATAL 

Only log fatal errors

CCW_LOG_ERROR 

(normal) Log errors. Program will continue

CCW_LOG_WARNING 

Also log warning - something suspicious occured

CCW_LOG_INFO 

Also log hints and informational messages

CCW_LOG_FUNCTIONS 

Log functions methods messages

CCW_LOG_DEBUG 

Log all messages, also debug messages. Use only if required

CCW_LOG_DEEP_DEBUG 

Log all messages, also deep debug messages. Use only if required. Could slow down the communication

◆ OpenDeviceMode

Open Communication Port Mode.

Enumerator
TXRX 

Indicates the library will open only the standard communication channel of the device

STS 

Indicates the library will open, if supported, only the status communication channel of the device

TXRX_STS 

Indicates the library will open the standard and, if supported, the status communication channels of the device (Default)

Constructor & Destructor Documentation

◆ CuCustomWndAPIWrap() [1/2]

Custom.CuCustomWndAPI.CuCustomWndAPIWrap.CuCustomWndAPIWrap ( )
inline

Costructor. Use the default log verbosity level and Log folder path.


◆ CuCustomWndAPIWrap() [2/2]

Custom.CuCustomWndAPI.CuCustomWndAPIWrap.CuCustomWndAPIWrap ( CcwLogVerbosity  logVerbosity,
String  strLogFolderPath 
)
inline

Costructor. Also specify log verbosity level and other settings.


Parameters
logVerbosityVerbosity log level.
strLogFolderPathLog folder path. If null or empty, the library uses the default path: "%Documents and settings%\CUSTOM\CuCustomWndAPI\Log".


Member Function Documentation

◆ BinFileToPrintSpooler()

void Custom.CuCustomWndAPI.CuCustomWndAPIWrap.BinFileToPrintSpooler ( String  strPrinterName,
String  strFilePath,
String  strDocName 
)
inline

Send a binary file into the printer spooler queue.

Parameters
strPrinterNameA string that is the installed printer name.
strFilePathA string with the file name to send to the printer spooler queue


Parameters
strDocNameA string that is the document name (this value will be visible into the spooler queue)


Exceptions
CuCustomWndAPIWrapException

◆ DeInitLibrary()

void Custom.CuCustomWndAPI.CuCustomWndAPIWrap.DeInitLibrary ( )
inline

De-initialize library. Call this function as the last function before deinit the class.


Exceptions
CuCustomWndAPIWrapException

◆ EnumCOMPorts()

COMPort[] Custom.CuCustomWndAPI.CuCustomWndAPIWrap.EnumCOMPorts ( )
inline

Enum the COM Ports found.


Returns
the COMPort array of all the COM ports found.
Exceptions
CuCustomWndAPIWrapException

◆ EnumETHDevices()

ETHDevice[] Custom.CuCustomWndAPI.CuCustomWndAPIWrap.EnumETHDevices ( UInt32  dwSearchTimeout)
inline

Enum the Ethernet/Wifi devices connected.


Parameters
dwSearchTimeoutThe timeout to search the ethernet / wifi devices, minimum 300 (ms)
Returns
the ETHDevice array of all the Ethernet/Wifi devices found.
Exceptions
CuCustomWndAPIWrapException

◆ EnumInstalledPrinters()

PrinterInfo[] Custom.CuCustomWndAPI.CuCustomWndAPIWrap.EnumInstalledPrinters ( )
inline

Enum the supported printers installed.


Returns
the PrinterInfo array of all the supported printers installed.
Exceptions
CuCustomWndAPIWrapException

◆ EnumUSBDevices()

USBDevice[] Custom.CuCustomWndAPI.CuCustomWndAPIWrap.EnumUSBDevices ( )
inline

Enum the usb devices connected.


Returns
the USBDevice array of all the usb devices found.
Exceptions
CuCustomWndAPIWrapException

◆ GetAPIVersion()

String Custom.CuCustomWndAPI.CuCustomWndAPIWrap.GetAPIVersion ( )
inline

Returns current API version.

Returns
A string containing the current API version
Exceptions
CuCustomWndAPIWrapException

◆ GetAPIVersionHwLibrary()

String Custom.CuCustomWndAPI.CuCustomWndAPIWrap.GetAPIVersionHwLibrary ( )
inline

Gets the API release for hardware library (C-library)

Returns
A String containing the hardware library (C-library) release
Exceptions
CuCustomWndAPIWrapException

◆ GetInstalledPrinterFullStatus()

PrinterStatus Custom.CuCustomWndAPI.CuCustomWndAPIWrap.GetInstalledPrinterFullStatus ( String  strPrinterName)
inline

Open the communication port, Get the status of a installed printer and close the communication with the device.


Parameters
strPrinterNameA string that is the installed printer name.


Returns
A PrinterStatus that contains the printer status.
Exceptions
CuCustomWndAPIWrapException


◆ GetOpenDeviceMode()

OpenDeviceMode Custom.CuCustomWndAPI.CuCustomWndAPIWrap.GetOpenDeviceMode ( )
inline

Get the open mode for the devices.


Returns
The value of the different way to open the communication channels of the device.
Exceptions
CuCustomWndAPIWrapException

◆ GetVariable()

object Custom.CuCustomWndAPI.CuCustomWndAPIWrap.GetVariable ( CuCustomWndDevice  device,
String  var 
)
inline

Get the value of an internal "parameter".

Parameters
deviceThe CuCustomWndDevice device with the application will communicate to.
varA string that is the variable ID
Returns
Object with the value of the variable.
Exceptions
CuCustomWndAPIWrapException

◆ InitLibrary()

void Custom.CuCustomWndAPI.CuCustomWndAPIWrap.InitLibrary ( )
inline

Initializes library. This must be the first call after the creation of the class.


Exceptions
CuCustomWndAPIWrapException

◆ OpenInstalledPrinter()

CuCustomWndDevice Custom.CuCustomWndAPI.CuCustomWndAPIWrap.OpenInstalledPrinter ( String  strPrinterName)
inline

Open the communication with a Installed printer.


Parameters
strPrinterNameA string that is the installed printer name.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIWrapException

◆ OpenPrinterCOM() [1/2]

CuCustomWndDevice Custom.CuCustomWndAPI.CuCustomWndAPIWrap.OpenPrinterCOM ( COMPort  cport)
inline

Open the communication with a COM port to printer

Parameters
cportA COMPort with all the parameters of the COM Port to open
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIWrapException

◆ OpenPrinterCOM() [2/2]

CuCustomWndDevice Custom.CuCustomWndAPI.CuCustomWndAPIWrap.OpenPrinterCOM ( String  strcport)
inline

Open the communication with a COM port to printer.


Parameters
strcportthe string with the COM port to open.


Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIWrapException

◆ OpenPrinterETH() [1/2]

CuCustomWndDevice Custom.CuCustomWndAPI.CuCustomWndAPIWrap.OpenPrinterETH ( ETHDevice  ethdevice)
inline

Open the communication with a Ethernet / WIFI printer

Parameters
ethdeviceA ETHDevice with all the parameters of the Ethernet / WIFI printer to open.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIWrapException

◆ OpenPrinterETH() [2/2]

CuCustomWndDevice Custom.CuCustomWndAPI.CuCustomWndAPIWrap.OpenPrinterETH ( String  strPrinterIPAddress,
UInt32  dwPrinterIPPort = 9100 
)
inline

Open the communication with a Ethernet / WIFI printer.


Parameters
strPrinterIPAddressthe string with the IP Address of the printer to open.
dwPrinterIPPortthe network port to open int the printer. If this value is 0, it is automatically set to the default for the RAW print port (9100).
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIWrapException

◆ OpenPrinterUSB()

CuCustomWndDevice Custom.CuCustomWndAPI.CuCustomWndAPIWrap.OpenPrinterUSB ( USBDevice  udevice)
inline

Open the communication with a USB printer.


Parameters
udeviceA USBDevice with all the parameters of the USB printer to open.
Returns
The CuCustomWndDevice device with the application will communicate to.
Exceptions
CuCustomWndAPIWrapException

◆ SetOpenDeviceMode()

void Custom.CuCustomWndAPI.CuCustomWndAPIWrap.SetOpenDeviceMode ( OpenDeviceMode  ode)
inline

Set the open mode for the devices.

Parameters
odeThe different way to open the communication channels of the device.


Exceptions
CuCustomWndAPIWrapException

◆ SetVariable()

void Custom.CuCustomWndAPI.CuCustomWndAPIWrap.SetVariable ( object  device,
String  var,
object  value 
)
inline

Set the value of an internal "parameter".

Parameters
deviceThe CuCustomWndDevice device with the application will communicate to.
varA string that is the variable ID


Parameters
valueObject with the value to assign to the variable.


Exceptions
CuCustomWndAPIWrapException